<?php
	
	chdir("../../");
	require ("PHP/config/main.conf.php");
	
	$result = Model::getAllProduct();
	
	$documentListOfProduct = '';
	foreach($result as $docNameOfProduct)
	{
		$oneProduct = new HTML('__oneProduct');
		$oneProduct -> set_var("PRODUCT_NAME",$docNameOfProduct['name']);
		$oneProduct -> set_var("PRICE",$docNameOfProduct['price']);
		$oneProduct -> set_var("ID",$docNameOfProduct['id']);
		$documentListOfProduct .= $oneProduct -> gen();
	}
	
	
	echo $documentListOfProduct;
?>